{meta_html js $j_basepath.'design/front/js/popup.js'}

{literal}
    <script type="text/javascript">
        function verifierCondition(){
            if ($('#cond_gen').is(':checked')) return true;
            else {
                $('#error').html('Vous devez accepter les conditions générales de ventes pour continuer !!');
                $('#cond_gen').focus();
                return false;  
            }
        }
    </script>
    <style type="text/css">
        .paiement-type {list-style:none; float:left; display:inline; margin:3px;}
    </style>
{/literal}
<!-- Saisie du num d'immatriculation et de la date de mise en circulation -->
{literal}
	<style>
    	#essai_fiche .chapitre p, td{font-size:12px;}
    </style>
{/literal}
<div id="global" class="search">
  {$oZoneHeader}
   <div id="main">
   <div id="ajout_annonce">
   		<div class="file_ariane2">
        	<ul>
            	<li><a class="a1">1. Détails de la voiture</a></li>
                <li><a href="#" class="a2 active">2. Choix formule</a></li>
                <li><a href="#" class="a2">3. Paiement</a></li>
                <li><a href="#" class="a3">4. Confirmation</a></li>
                <li><a href="#" class="a4">5. Validation</a></li>

            </ul>
        </div>
        <div id="formule2">
                <div class="wrap">
                    <h2>Formule</h2>
                    <div class="wrap2">
                            {if $formules->titre =='La féerique'}
                                <div id="la_feerique">
                                    <h4>{$formules->titre}</h4>
                                    {foreach $toOptions as $iKeyOption => $oOption}
                                           {if $oOption->lib_option_formule =='Parution'}
                                               {foreach $oOption->toChoises as $iKey => $oChoise}
                                                    {if substr($formules->options, $iKeyOption, 1) == $iKey}
                                                    <span class="parution">{$oChoise->formch_libelle|escxml} </span>
                                                    {/if}
                                               {/foreach}
                                            {/if}
                                        {/foreach}
                                        <span class="prix">{$formules->prix} €</span>
                                        <div class="center">
                                            <span class="s1">+</span>
                                            {foreach $toOptions as $iKeyOption => $oOption}
                                               {if $oOption->lib_option_formule =='Photo'}
                                                 {foreach $oOption->toChoises as $iKey => $oChoise}
                                                       {if substr($formules->options, $iKeyOption, 1) == $iKey}
                                                       <span class="s2">{$oChoise->formch_libelle|escxml}</span>
                                                   {/if}
                                                  {/foreach}
                                               {/if}
                                            {/foreach}
                                            <span class="s3">+</span>
                                            <span class="s4">Multi-diffusion<br />sur 11 sites auto</span>
                                             <span class="s5">2.800.000<br />internautes!</span>
                                            <span class="s6">+ 4 photos sur le web</span>
                                        </div>
                                       {foreach $toOptions as $iKeyOption => $oOption}
                                           {if $oOption->lib_option_formule =='Durée'}
                                             {foreach $oOption->toChoises as $iKey => $oChoise}
                                                {if substr($formules->options, $iKeyOption, 1) == $iKey}
                                                    <a class="btn5" href="#">{$oChoise->formch_libelle|escxml}</a>
                                                {/if}
                                             {/foreach}
                                           {/if}
                                     {/foreach}
                               </div><!--end la_feerique-->
                            {/if}

                            {if $formules->titre =='La dynamique'}
                                <div id="la_dynamique">
                                    <h4>{$formules->titre}</h4>
                                    {foreach $toOptions as $iKeyOption => $oOption}
                                           {if $oOption->lib_option_formule =='Parution'}
                                               {foreach $oOption->toChoises as $iKey => $oChoise}
                                                    {if substr($formules->options, $iKeyOption, 1) == $iKey}
                                                    <span class="parution">{$oChoise->formch_libelle|escxml} </span>
                                                    {/if}
                                               {/foreach}
                                            {/if}
                                    {/foreach}
                                    <span class="prix">{$formules->prix} €</span>
                                     <div class="center">
                                        <span class="s3">+</span>
                                        <span class="s4">Multi-diffusion<br />sur 11 sites auto</span>
                                        <span class="s5">2.800.000<br />internautes!</span>
                                        <span class="s6">+ 4 photos sur le web</span>
                                     </div>
                                     {foreach $toOptions as $iKeyOption => $oOption}
                                           {if $oOption->lib_option_formule =='Durée'}
                                             {foreach $oOption->toChoises as $iKey => $oChoise}
                                                {if substr($formules->options, $iKeyOption, 1) == $iKey}
                                                    <a class="btn5" href="#">{$oChoise->formch_libelle|escxml}</a>
                                                {/if}
                                             {/foreach}
                                           {/if}
                                    {/foreach}
                                </div>
                            {/if}

                            {if $formules->titre =='La basique'}
                               <div id="la_basique">
                                    <h4>{$formules->titre}</h4>
                                     {foreach $toOptions as $iKeyOption => $oOption}
                                           {if $oOption->lib_option_formule =='Parution'}
                                               {foreach $oOption->toChoises as $iKey => $oChoise}
                                                    {if substr($formules->options, $iKeyOption, 1) == $iKey}
                                                    <span class="parution">{$oChoise->formch_libelle|escxml} </span>
                                                    {/if}
                                               {/foreach}
                                            {/if}
                                     {/foreach}
                                    <span class="prix">{$formules->prix} €</span>
                              </div>
                            {/if}
                    </div>
                    
                </div>
            </div>
        <div id="leftContent3">
                <!-----------debut du recap--------->
                <div id="recap">
                    <div class="wrap">
                        <div class="wrap2">
                            <div class="cont"> 
                                <div class="cont2">
                                    <h2>Recapitulatif de mon annonce</h2>
                                    <div class="ttl">Mon véhicule <a href="{jurl 'annonce~FoAnnonceDeposer:detail', array('idOccasion'=>$idOccasion), false}">Modifier</a></div>
                                    <p>Marque : <strong>{$recapAnnonce->marque}</strong></p>
                                    <p>Modele : {$recapAnnonce->modele}</p>
                                    <p>Version : <strong>{$recapAnnonce->version}</strong></p>
                                    <p>Kilometrage : <strong>{$recapAnnonce->km}</strong></p>
                                    <p>Prix : <strong>{$recapAnnonce->prix}</strong></p>
                                    <div class="ttl">Sommaires des équipements <a href="{jurl 'annonce~FoAnnonceDeposer:detail', array('idOccasion'=>$idOccasion, 'pos'=>1), false}">Modifier</a></div>
                                    {foreach $recapAnnonce->recapEquipement as $itemRecap}
                                        {if sizeof($itemRecap->equipement)}
                                            <p>{$itemRecap->categorie}</p>

                                            <ul>
                                                {foreach $itemRecap->equipement as $itemEquipement}
                                                    <li>{$itemEquipement}</li>
                                                {/foreach}
                                            </ul>
                                        {/if}
                                    {/foreach}
                                    
                                    <div class="ttl">Coordonnées <a href="{jurl 'annonce~FoAnnonceDeposer:detail', array('idOccasion'=>$idOccasion, 'pos'=>2), false}">Modifier</a></div>
                                    <p>{$recapAnnonce->vendeurNom}</p>
                                    <p>{$recapAnnonce->tel1}</p>
                                    <p>{$recapAnnonce->tel2}</p>
                                    <p>{$recapAnnonce->tel3}</p>
                                    <p>{$recapAnnonce->vendeurMail}</p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
        <!-----------fin du recap----------->
             
        </div><!--end leftContent3-->
        {assign $linkCb = LINK_PAIEMENT_CB}

        <form action="{$linkCb}" method="post">
            <div id="formule3" style="width:670px;margin-right:-15px!important;">
                <div class="wrap">
                    <h2>Méthode de paiement</h2>
                    <div class="wrap2">
                        <div class="modePay">
                            <ul>
                               <li class="paiement-type">
                                    <INPUT TYPE = hidden NAME = PBX_PAYBOX VALUE = 'https://preprod-tpeweb.paybox.com/cgi/MYchoix_pagepaiement.cgi'>
                                    <INPUT TYPE = hidden NAME = PBX_BACKUP1 VALUE = 'https://preprod-tpeweb.paybox.com/cgi/MYchoix_pagepaiement.cgi'>
                                    <INPUT TYPE = hidden NAME = PBX_BACKUP2 VALUE = 'https://preprod-tpeweb.paybox.com/cgi/MYchoix_pagepaiement.cgi'>
                                    <INPUT TYPE = hidden NAME = PBX_MODE VALUE = '1'>
                                    <INPUT TYPE = hidden NAME = PBX_SITE VALUE = '0765493'>
                                    <INPUT TYPE = hidden NAME = PBX_RANG VALUE = '01'>
                                    <INPUT TYPE = hidden NAME = PBX_IDENTIFIANT VALUE = '507127633'>
                                    <INPUT TYPE = hidden NAME = PBX_TOTAL VALUE ="{$montant}">
                                    <INPUT TYPE = hidden NAME = PBX_DEVISE VALUE = '978'>
                                    <INPUT TYPE = hidden NAME = PBX_CMD VALUE = "{$nombre_cmd}">
                                    <INPUT TYPE = hidden NAME = PBX_PORTEUR VALUE ="{$vendeur}">
                                    <INPUT TYPE = hidden NAME = PBX_RETOUR VALUE = 'montant:M;ref:R;auto:A;trans:T'>
                                    <INPUT TYPE = hidden NAME = PBX_EFFECTUE VALUE = "{$pathmerci}">
                                    <INPUT TYPE = hidden NAME = PBX_ERREUR VALUE = "{$patherror}"> <!-- Si erreur, redirection sur cette page avec le code d'erreur-->

                                    <INPUT TYPE = hidden NAME = PBX_REFUSE VALUE = "{$pathregret}">
                                    <INPUT TYPE = hidden NAME = PBX_ANNULE VALUE = "{$pathregret}">
                                    <INPUT TYPE = hidden NAME = "tarif"  VALUE = "{$tarif}">

                                    <INPUT TYPE="image" title="Cb" src="{$j_basepath}design/front/images/cb.jpg" name="bouton_paiement"  />
                                </li>
                                
                                <li class="paiement-type"><a class="a2" href="#"><INPUT TYPE="image"  title="Visa" src="{$j_basepath}design/front/images/visa.jpg"></a></li>
                                <li class="paiement-type"><a class="a2" href="{jurl  'annonce~FoAnnonceDeposer:confirmation',array('id'=>$formules->id, 'idOccasion'=>$idOccasion, 'type'=>'ch')}"><INPUT TYPE="image" src="{$j_basepath}design/front/images/cheque.jpg" title="Chèque"></a></li>                                <li class="paiement-type"><a class="a2" href="#"><INPUT TYPE="image"   style ="margin-left:15px"  src="{$j_basepath}design/front/images/tel.jpg" title="Tel"></a></li>
                                </form>
                                <li>
                                <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
                                    <input type='hidden' value="47.87" name="amount" />
                                    <input name="currency_code" type="hidden" value="EUR" />
                                    <input name="shipping" type="hidden" value="5.00" />
                                    <input name="tax" type="hidden" value="5.00" />
                                    <input name="return" type="hidden" value="{$pathmerci}" />
                                    <input name="cancel_return" type="hidden" value="{$pathregret}" />
                                    <input name="notify_url" type="hidden" value="{$pathnotify}" />
                                    <input name="cmd" type="hidden" value="_xclick" />
                                    <input name="business" type="hidden" value="vonnon_1333695037_biz@gmail.com" />
                                    <input name="item_name" type="hidden" value="Nom de votre produit" />
                                    <input name="no_note" type="hidden" value="1" />
                                    <input name="lc" type="hidden" value="FR" />
                                    <input name="bn" type="hidden" value="PP-BuyNowBF" />
                                    <input name="custom" type="hidden" value="ID_ACHETEUR" />
                                    <input alt="Effectuez vos paiements via PayPal : une solution rapide, gratuite et sécurisée" name="submit" src="{$j_basepath}design/front/images/paipal.jpg" title="Paypal"type="image" /><img src="https://www.paypal.com/fr_FR/i/scr/pixel.gif" border="0" alt="" width="1" height="1" />
                                </form>
                                </li>
                            </ul>
                        </div>
                        <div class="infos">
                                <p>&nbsp;<a href="#" class="showErrCodePaiement">&nbsp;</a></p> <!-- useful for popup when error code -->

                            <p>Votre chèque doit être à l’ordre de Auto Occasion et envoyé a:
                                Auto Occasion
                                1 Bd de l’Oise
                                95030 Cergy Pontoise</p>
                        </div>
                    </div>
                </div>
            </div>
            <!--end formule2-->
            <div class="navig_btn" style="position:relative; left:-81px; top:15px;">
                <a style="margin-left: 65px !important;" class="a1" href="{jurl 'annonce~FoAnnonceDeposer:choixFormule', array('idOccasion'=>$idOccasion), false}"><img alt="Rétour" src="{$j_basepath}design/front/images/btn_retour.png" title="Rétour" /></a>
            </div>
        </form>
      
	<div class="clear">&nbsp;</div>
   </div>
   <!--end ajout annonce-->
    <div class="clear">&nbsp;</div>
  </div>
  <div id="SideBar"><a href="#global"><img alt="" src="{$j_basepath}design/front/images/top.png" title="" /></a></div>
</div>
{$oZoneFooter}

<div id="popErrCodePaiement" class="pop-up cgv" style="left:287px;"> <a href="#" class="close" style="float:right;margin-right:20px;">Fermer</a>
    <h2>Erreur de la transaction</h2>
    <p>{$codeErr}</p>
    <div class="clear">&nbsp;</div>
</div>

{if $err}

<script type="text/javascript">
{literal}
    $(function(){
        $('.showErrCodePaiement').click();
        $('#popErrCodePaiement').css('left', '287px');
    });
{/literal}
</script>
{/if}
<div id="masque"></div>